/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UTS.Pengujian;

import UTS.model.Dokumen;
import UTS.model.DokumenTableModel;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Vincentius HMK
 */
public class PengujianDokumenTableModel {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        ArrayList<Dokumen> test1 = new ArrayList<Dokumen>();
       Dokumen test11 = new Dokumen();
        try {
            test11.setNomor("123");
            test11.setPerihal("Dokumen");
            test11.setAsal("USD");
            test11.setPenerima("Vincent");
            test11.setLetak("Loker");
            test11.setTanggalDiterima(null);
            test11.setStatusDokumen("Belum Diterima");
        } catch (Exception ex) {
            Logger.getLogger(PengujianDokumenTableModel.class.getName()).log(Level.SEVERE, null,
                    ex);
        }
        Dokumen test12 = new Dokumen();
        try {
            test12.setNomor("098");
            test12.setPerihal("Dokumen");
            test12.setAsal("USD");
            test12.setPenerima("Rendra");
            test12.setLetak("Lemari");
            test12.setTanggalDiterima(null);
            test12.setStatusDokumen("Belum Diterima");
        } catch (Exception ex) {
            Logger.getLogger(PengujianDokumenTableModel.class.getName()).log(Level.SEVERE, null,
                    ex);
        }
        test1.add(test11);
        test1.add(test12);
        DokumenTableModel test2 = new DokumenTableModel(test1);
        System.out.println("Nomor :" + test2.getValueAt(0, 0) + " Perihal:" + test2.getValueAt(0, 1));
        System.out.println("Nomor :" + test2.getValueAt(1, 0) + " Perihal:" + test2.getValueAt(1, 1));
    }

}
